Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💾 Iobio Charts @19 #39

Merged
merged 7 commits into from
Aug 2, 2024
Merged

💾 Iobio Charts @19 #39

merged 7 commits into from
Aug 2, 2024

Conversation

demariadaniel
Copy link
Contributor

@demariadaniel demariadaniel commented Aug 1, 2024

Updates Iobio Charts to v0.19

  • Changes 'title' attribute to 'label'
  • Adds secondary colour style property to Percent Box
  • Additional library updates (coverage depth rendering)

@demariadaniel demariadaniel changed the title WIP: Iobio Charts @17 WIP: Iobio Charts @18 Aug 1, 2024

if (element && styles) {
setElementStyles(element, styles);
}
Copy link
Contributor Author

@demariadaniel demariadaniel Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a follow up ticket to improve the styles utility: #27

Copy link
Member

@justincorrigible justincorrigible Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!
PS: Took the liberty to modify your comment to replace the ZenHub link with a GitHub one, so external collaborators and integrators can follow progress. (they don't have acccess otherwise)

@demariadaniel demariadaniel changed the title WIP: Iobio Charts @18 WIP: Iobio Charts @19 Aug 2, 2024
@demariadaniel demariadaniel changed the title WIP: Iobio Charts @19 💾 Iobio Charts @19 Aug 2, 2024
@@ -26,12 +26,12 @@ function IobioHistogram({
brokerKey,
styles,
ignoreOutliers = false,
title,
label,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may seem like nitpicking, but it's highly recommended to keep properties alphabetised whenever possible.

not a change required for this PR, but something to keep in mind for future changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally try to do that, guess I overlooked this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here and in a few other places. don't worry too much about it for now.
it's more DevX than functionality, so it's not an urgent thing to address.

Copy link
Member

@justincorrigible justincorrigible left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@demariadaniel demariadaniel merged commit 6bfff38 into main Aug 2, 2024
@demariadaniel demariadaniel deleted the chore/iobio-charts-@17 branch August 2, 2024 14:42
}) {
useEffect(() => {
const selector = `iobio-percent-box[percent-key=${percentKey}][total-key=${totalKey}]`;
const element = document.querySelector(selector);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

react refs might be useful here:

  • no need to worry about multiple elements
    • document.querySelector will return one element but what if the selector accidentally target multiple elements)
  • avoids searching the DOM for an element
  • inbuilt React library code for targeting DOM elements
    • react will handle updating val to null if element is not available
  • doesn't depend on document api being available (eg. for SSR)

@demariadaniel demariadaniel mentioned this pull request Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants